//
//  dispatchInfo.m
//  cocoapodText
//
//  Created by apple on 16/10/19.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "dispatchInfo.h"
#import <Foundation/Foundation.h>

@implementation dispatchInfo

-(instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        //使用KVC
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}

/**
 *  工厂方法
 *
 *  @param dict 字典
 *
 *  @return 模型
 */
+(instancetype)dispatchInfoWithDict:(NSDictionary *)dict
{
    return [[self alloc]initWithDict:dict];
}

/**
 *  工厂方法
 *
 *  @param dict 字典
 *
 *  @return 模型
 */
+(instancetype)dispatchInfoWithName:(NSString *)name type:(NSString *)type load:(NSString *)load number:(NSString *)number price:(NSString *)price startTime:(NSString *)startTime endTime:(NSString *)endTime content:(NSString *)content color:(NSString *)color{
    NSDictionary *dict = @{@"Name":name,@"Type":type,@"Load":load,@"Number":number,@"Price":price,@"StartTime":startTime,@"EndTime":endTime,@"Content":content,@"Color":color};
    return [[self alloc]initWithDict:dict];
}

@end
